#ifndef __NAMEINPUT_H__
#define __NAMEINPUT_H__

#include <QtGui/QWidget>
#include <QtGui/QLineEdit>
#include <QtGui/QLabel>
#include <QtGui/QPushButton>
#include <QtGui/QVBoxLayout>
#include <QtGui/QHBoxLayout>

namespace verema
{

/**
*  \brief This class is a simple input dialog widget.
*/
class nameInput : public QWidget
{
Q_OBJECT

	public:
		/**
		*  \brief Constructor
		*/
		nameInput();

		/**
		*  \brief Destructor
		*/
		~nameInput() {};
		
		/**
		*  \brief This function sets the prompt text on the dialog.
		*  \param message text to show.
		*/
		void setMessage(QString message);

		/**
		*  \brief This function returns the current text entered by user.
		*  \return QString current text on input line
		*/
		QString getInput();
		
	signals:
		/**
		*  \brief This signal is emitted when the user finishes editing by clicking ok button
		*/
		void okClicked();
		
	private slots:
		/**
		*  \brief This slot emits the okClicked signal when the user finishes editing.
		*/
		void okActivated();
		
	private:
		QVBoxLayout vbl_mainLayout;
		QHBoxLayout hbl_buttons;
		
		QLabel lbl_info;
		QLineEdit led_input;
		QPushButton btn_ok, btn_cancel;
};

} // namespace verema

#endif
